#include "..\..\incl\TernaryTreeSearch\TernaryTree.h"

#include <iostream>
#include <cstdlib>
#include <cassert>
using namespace std;

typedef TNode<char, int> StringIntNode;
typedef StringIntNode* StringIntNodePtr;

int main()
{
	int tR = 1;
	char* testR = "i";
	StringIntNode* testRootNode = 
		insert((StringIntNode*)0, testR, &tR);

	char* testM = "ms";
	insert(testRootNode, testM);
	
	StringIntNode* mHeadNode = searchHead(testRootNode, testM);


	char* testNvi = "nvi";
	insert(testRootNode, testNvi);
	

	StringIntNode* parentNode = searchParent(testRootNode, testNvi);
	StringIntNode* headNode = searchHead(testRootNode, testNvi);

	//destroyFrom(parentNode, headNode);
	destroyFrom((StringIntNode*)0, testRootNode);
	/*std::vector<StringIntNodePtr> pmsearchResult;
	pmsearch(testRootNode, ".vi", pmsearchResult);*/

	//char* testDuplicate = "nv";
	//int** nvNumRetrieve = 0;
	//StringIntNode* dupNode = insert(testRootNode, testDuplicate, nvNumRetrieve);
	//if (nvNumRetrieve && (*nvNumRetrieve))
	//	**nvNumRetrieve *= 2;
	
	//dfs(testRootNode);
	system("pause");
}